$(function() {
	var sWidth = $("#zt1").width();
	var len = $("#zt1 .zt_con").length;
	var index = 0;
	var picTimer;	
	var btn = "<a class='prev2'></a><a class='next2'></a>";
	$("#zt1").append(btn);
	// Prev
	$("#zt1 .prev2").click(function() {
		index -= 1;
		if(index == -1) {index = len - 1;}
		showPics(index);
	});
	// Next
	$("#zt1 .next2").click(function() {
		index += 1;
		if(index == len) {index = 0;}
		showPics(index);
	});
	// 
	$("#zt1 .zt_box").css("width",sWidth * (len));
	// mouse 
	$("#zt1").hover(function() {
		clearInterval(picTimer);
	});	
	// showPics
	function showPics(index) {
		var nowLeft = -index*sWidth; 
		$("#zt1 .zt_box").stop(true,false).animate({"left":nowLeft},0);
	}
	
	//首页焦点图 鼠标移过，左右按钮显示
	$(".focusPic").hover(function() {
		$(this).find(".prev,.next").fadeTo("show", 0.1);
	}, function() {
		$(this).find(".prev,.next").hide();
	})
	/*鼠标移过某个按钮 高亮显示*/
	$(".prev,.next").hover(function() {
		$(this).fadeTo("show", 0.8);
	}, function() {
		$(this).fadeTo("show", 0.3);
	})
	$(".focusPic").slide({titCell: ".num ul", mainCell: ".focusPic2", effect: "fold", autoPlay: true, delayTime: 700, autoPage: true});
//焦点图结束

});

